package com.example.mapper;

import com.example.entity.StudentScore;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StudentScoreRepository extends JpaRepository<StudentScore, Long> {
    // 获取相同学校和专业的学生分数列表，并按分数降序排列
    List<StudentScore> findBySchoolAndMajorOrderByScoreDesc(String school, String major);
    boolean existsByName(String name); // 检查是否存在具有相同姓名的学生
}

